<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>网关月度统计表</title>
<link href="${cdnctx}/dep/jquery/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
<style>
    #container td {
        padding: 5px 10px;
        text-align: center;      
        white-space: nowrap;
    }
    .ui-autocomplete-category {
        font-weight: bold;
        padding: .2em .4em;
        margin: .8em 0 .2em;
        line-height: 1.5;
    }

</style>
<%@ include file="/common/util.jsp"%>
<script type="text/javascript" src="${cdnctx }/src/statistics/gatewaymonth.js"></script>
<script type="text/javascript">

    $.widget("brand.superAutocomplete", $.ui.autocomplete,{
        _renderMenu:function(ul,items){
            var that = this;
            var parent = "";
            $.each(items,function(index,item){
                if(item.customer!=parent){
                    ul.append("<li class='ui-autocomplete-category'>"+item.customer+"</li>");
                    parent = item.customer;
                }
                that._renderItemData( ul, item )
            })
        }
    });

    $(function() {
        var gateways = eval('${gateways}');
        $( "#gatewayId" ).superAutocomplete({
          source: gateways,
          minLength: 0
        });
        $( "#gatewayId" ).focus(function() {
            $(this).superAutocomplete('search');
        })
    })
</script>
</head>

<body class="main">
	<div class="-frame -style -luster" id="css_container">

		<!--首页框架页眉部分↓-->
		<%@ include file="/WEB-INF/pages/inc/header.jsp"%>
		<!--首页框架页眉部分↑-->

		<div class="content">
		<!-- Left导航菜单◎开始 -->
			<%@ include file="/WEB-INF/pages/inc/leftmenu.jsp"%>
			<!-- Left导航菜单◎结束 -->
            <input type="hidden" class="form-control" id="sessionCustomerName" value="${customername }">
			<div class="main-mid">
                <div class="pos"><img src="${cdnctx}/src/index/img/index.png"><a href="">数据报表  ></a><a href="#">网关月度统计表</a></div>
				<form class="form-inline" style="min-width:700px;margin-left: 20px;margin-top: 20px;">
                    <label class="search_text">日期：</label>
                    <input type="text" style="cursor: pointer;" readOnly class="search_input Wdate" id="searchDate" name="searchDate" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM'})" value="2015-09">
                    <label class="search_text">网关号：</label>
                    <input type="text" style="cursor: pointer;" class="search_input" id="gatewayId" name="gatewayId" placeholder="选择网关">
                    <input type="button" class="search_btn" id="searchEnergy" value="查询"/>
                    <input type="reset" class="reset_btn" id="export_excel" value="导出" />
                    <label id="errorMessage"></label>
                </form>
                <div id="container" style="margin: 20px;min-width:700px;">
                    <div align="center" style="margin:20px;font-size: 24px;">公司用灯时间统计表</div>
                    <table id="gateway_table" border="1" cellspacing='0px'>
                        <thead>
                            <tr>
                            </tr>
                        </thead>
                        <tbody>
                            
                        </tbody>
                    </table>
                    <div align="center"><label style="font-size: 15px" id="noDataMessage"></label></div>
                </div>
			</div>
		</div>
		<!--首页框架页尾部分↓-->
		<%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
		<!--首页框架页尾部分↑-->
		</div>
</body>
</html>